# 作者: YYJ
# 2025年07月17日16时51分04秒
# 2486249622@qq.com


class Goods:
    def __init__(self, original_price, discount):
        self.__original_price = original_price
        self.discount = discount

    @property
    def price(self):
        return self.__original_price * self.discount  # 计算优惠价(读)

    @price.setter
    def price(self, value):
        self.__original_price = value  # 设置原价(写)

    @price.deleter
    def price(self):
        print("@price.deleter")


if __name__ == '__main__':
    goods = Goods(100, 0.8)
    print(goods.price)
    goods.price = 200
    print(goods.price)
